package com.lhkj.ct.base.json;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@JacksonAnnotationsInside // 这是个自定义Jackson注解，在jackson序列化时被关注
@JsonSerialize(using = SensitiveSerializer.class) // 被改注解修饰的字段，应该使用自定义序列化器
public @interface SensitiveData {
    SensitiveEnum strategy();
}
